package com.example.tbplus14.Test;

import org.openjdk.jol.info.ClassLayout;

import java.lang.ref.SoftReference;
import java.util.HashMap;

public class ObjectTest {

    public static void main(String[] args) {
        Object obj = new Object();
        System.out.println(ClassLayout.parseInstance(obj).toPrintable());

        //

        SoftReference<HashMap<String, String>> cacheSoftRef =
                new SoftReference<HashMap<String, String>>(new HashMap<String, String>());
        cacheSoftRef.get().put("竹子","熊猫");
        System.out.println(cacheSoftRef.get().get("竹子"));


    }

}
